{template header}

<!--{if $webglobal[mode]=='newsadd'}-->

	<script type="text/javascript" charset="utf-8" src="{ADMIN_WEBURLPATH}/images/calendar.js"></script>
	<script type="text/javascript" charset="utf-8" src="{WEBURLPATH}/editor/kindeditor-min.js"></script>
	<table class="menutable" cellspacing="1">
		<thead>
			<tr><td>资讯管理</td></tr>
		</thead>
		<tbody>
			<tr><td>
				<a href="{ADMIN_WEBURLPATH}/index.php?mode=news">[资讯列表]</a>
			</td></tr>
		</tbody>
	</table>

	<form name="addform" method="post" action="{ADMIN_WEBURLPATH}/index.php?mode=newsadd&check">
	<table class="datatable" cellspacing="1">
		<thead>
			<tr><td colspan="2">添加资讯</td></tr>
		</thead>
		<tbody>
			<tr>
				<th>资讯分类<span class="need"> *</span></th>
				<td>
					<select name="news_category_id">
						<option value="0">选择分类...</option>
						<!--{loop $webglobal[file_news][category] $categoryID $option}-->
						<option value="{$categoryID}">{$option[showName]}</option>
						<!--{/loop}-->
					</select>
				</td>
			</tr>
			<tr>
				<th>资讯标题<span class="need"> *</span></th>
				<td>
					<input type="text" name="title" size="70" value="" />
				</td>
			</tr>
			<tr>
				<th>来自<div>文章来源，可不填</div></th>
				<td>
					<input type="text" name="from" size="50" value="" />
				</td>
			</tr>
			<tr>
				<th>权重<div>用于排序，越大越排前面，小于0不显示</div></th>
				<td>
					<input type="text" name="weight" size="10" value="0" />
				</td>
			</tr>
			<tr>
				<th>其他选项</th>
				<td>
					<input type="checkbox" name="index" id="index" value="1" /><label for="index">网站首页显示</label>&nbsp;&nbsp;
					<input type="checkbox" name="ishot" id="ishot" value="1" /><label for="ishot">作为热门资讯</label>
				</td>
			</tr>
			<tr>
				<th>显示时间<div>用于展示资讯的发表时间，可不填</div></th>
				<td>
					<input type="text" name="showtime" style="width:200px;" value="" onfocus="c.showMoreDay=false;c.show(this);" />
				</td>
			</tr>
			<tr>
				<th>资讯内容<span class="need"> *</span></th>
				<td>
					<script>
						KE.show({
							id : 'content',
							items : ['source', '|', 'undo', 'redo', 'cut', 'copy', 'paste',
									'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
									'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
									'superscript', '|', 'selectall', 'fullscreen', '-',
									'fontname', 'fontsize', '|', 'textcolor', 'bgcolor', 'bold',
									'italic', 'underline', 'strikethrough', 'removeformat', '|', 'image',
									'flash', 'media', 'advtable', '|', 'link', 'unlink', '|', 'pagebreak'],
							imageUploadJson : '{WEBURLPATH}/editor/editorup.php?upfrom=news',
							resizeMode : 1
						});
					</script>
					<textarea id="content" name="content" style="width:100%;height:500px;"></textarea>
				</td>
			</tr>
		</tbody>
		<tfoot>
			<tr><td colspan="2">
				<input type="submit" name="adminsubmit" class="submitok" value=" 确  认 " />&nbsp;&nbsp;
				<input type="reset" name="adminreset" value=" 取  消 " />
			</td></tr>
		</tfoot>
	</table>
	</form>

<!--{elseif $webglobal[mode]=='newsedit'}-->

	<script type="text/javascript" charset="utf-8" src="{ADMIN_WEBURLPATH}/images/calendar.js"></script>
	<script type="text/javascript" charset="utf-8" src="{WEBURLPATH}/editor/kindeditor-min.js"></script>
	<table class="menutable" cellspacing="1">
		<thead>
			<tr><td>资讯管理</td></tr>
		</thead>
		<tbody>
			<tr><td>
				<a href="{ADMIN_WEBURLPATH}/index.php?mode=news&{$webrequest[gourl]}">[资讯列表]</a>
			</td></tr>
		</tbody>
	</table>

	<form name="editform" method="post" action="{ADMIN_WEBURLPATH}/index.php?mode=newsedit&check&gourl={$webglobal[file_news][gourlencode]}">
	
	<input type="hidden" name="editid" value="{$webrequest[editid]}" />
	<table class="datatable" cellspacing="1">
		<thead>
			<tr><td colspan="2">修改资讯</td></tr>
		</thead>
		<tbody>
			<tr>
				<th>资讯分类<span class="need"> *</span></th>
				<td>
					<select name="news_category_id">
						<option value="0">选择分类...</option>
						<!--{loop $webglobal[file_news][category] $categoryID $option}-->
						<option value="{$categoryID}">{$option[showName]}</option>
						<!--{/loop}-->
					</select>
					<script type="text/javascript">common_CheckedSelect('news_category_id', '{$webglobal[file_news][editinfo][news_category_id]}');</script>
				</td>
			</tr>
			<tr>
				<th>资讯标题<span class="need"> *</span></th>
				<td>
					<input type="text" name="title" size="70" value="{$webglobal[file_news][editinfo][title]}" />
				</td>
			</tr>
			<tr>
				<th>来自<div>文章来源，可不填</div></th>
				<td>
					<input type="text" name="from" size="50" value="{$webglobal[file_news][editinfo][from]}" />
				</td>
			</tr>
			<tr>
				<th>权重<div>用于排序，数字越大越排前面</div></th>
				<td>
					<input type="text" name="weight" size="10" value="{$webglobal[file_news][editinfo][weight]}" />
				</td>
			</tr>
			<tr>
				<th>其他选项</th>
				<td>
					<input type="checkbox" name="index" id="index" value="1"{if $webglobal[file_news][editinfo][index]==1} checked="checked"{/if} /><label for="index">网站首页显示</label>&nbsp;&nbsp;
					<input type="checkbox" name="ishot" id="ishot" value="1"{if $webglobal[file_news][editinfo][ishot]==1} checked="checked"{/if} /><label for="ishot">作为热门资讯</label>
				</td>
			</tr>
			<tr>
				<th>显示时间<div>用于展示资讯的发表时间，可不填</div></th>
				<td>
					<input type="text" name="showtime" style="width:200px;" value="{$webglobal[file_news][editinfo][showtime_show]}" onfocus="c.showMoreDay=false;c.show(this);" />
				</td>
			</tr>
			<tr>
				<th>资讯内容<span class="need"> *</span></th>
				<td>
					<script>
						KE.show({
							id : 'content',
							items : ['source', '|', 'undo', 'redo', 'cut', 'copy', 'paste',
									'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
									'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
									'superscript', '|', 'selectall', 'fullscreen', '-',
									'fontname', 'fontsize', '|', 'textcolor', 'bgcolor', 'bold',
									'italic', 'underline', 'strikethrough', 'removeformat', '|', 'image',
									'flash', 'media', 'advtable', '|', 'link', 'unlink', '|', 'pagebreak'],
							imageUploadJson : '{WEBURLPATH}/editor/editorup.php?upfrom=news',
							resizeMode : 1
						});
					</script>
					<textarea id="content" name="content" style="width:100%;height:500px;">{$webglobal[file_news][editinfo][content]}</textarea>
				</td>
			</tr>
		</tbody>
		<tfoot>
			<tr><td colspan="2">
				<input type="submit" name="adminsubmit" class="submitok" value=" 确  认 " />&nbsp;&nbsp;
				<input type="reset" name="adminreset" value=" 取  消 " />
			</td></tr>
		</tfoot>
	</table>
	</form>

<!--{elseif $webglobal[mode]=='news'}-->

	<table class="menutable" cellspacing="1">
		<thead>
			<tr><td>资讯管理</td></tr>
		</thead>
		<tbody>
			<tr><td>
				<a href="{ADMIN_WEBURLPATH}/index.php?mode=newsadd">[添加资讯]</a>
			</td></tr>
		</tbody>
	</table>

	<form name="searchform" method="post" action="{ADMIN_WEBURLPATH}/index.php?mode=news">
	<table class="datatable" cellspacing="1">
		<thead>
			<tr>
				<td colspan="3">搜索资讯</td>
			</tr>
		</thead>
		<tbody>
			<tr>
				<th style="width: 100px;">搜索选项</th>
				<td>
					<select name="class">
						<option value="0">--- 全部分类 ---</option>
						<!--{loop $webglobal[file_news][category] $categoryID $option}-->
						<option value="{$categoryID}">{$option[showName]}</option>
						<!--{/loop}-->
					</select>
					<script type="text/javascript">common_CheckedSelect('class', '{$webrequest[class]}');</script>
					<input type="text" name="searchkey" value="$webrequest[searchkey]" size="50" />
				</td>
				<td style="width: 100px; text-align: center"><input type="submit" name="searchsubmit" value=" 搜  索 " /></td>
			</tr>
		</tbody>
	</table>
	</form>

	<form name="editform" method="post" action="{ADMIN_WEBURLPATH}/index.php?mode=newsup&check&gourl={$webglobal[file_news][gourlencode]}">
	<table class="datatable" cellspacing="1">
		<thead>
			<tr>
				<th width="5%">删？</th>
				<th width="5%"><a href="{ADMIN_WEBURLPATH}/index.php?mode=news&order=id{$webglobal[file_news][pageurl]}" class="special" title="点击按此排序">编号<!--{if $webrequest[order]=='id'}-->↓<!--{/if}--></a></th>
				<th width="5%">分类</th>
				<th width="5%"><a href="{ADMIN_WEBURLPATH}/index.php?mode=news&order=index{$webglobal[file_news][pageurl]}" class="special" title="点击按此排序">首页<!--{if $webrequest[order]=='index'}-->↓<!--{/if}--></a></th>
				<th width="5%"><a href="{ADMIN_WEBURLPATH}/index.php?mode=news&order=ishot{$webglobal[file_news][pageurl]}" class="special" title="点击按此排序">热门<!--{if $webrequest[order]=='ishot'}-->↓<!--{/if}--></a></th>
				<th width="5%"><a href="{ADMIN_WEBURLPATH}/index.php?mode=news&order=weight{$webglobal[file_news][pageurl]}" class="special" title="点击按此排序">权重<!--{if $webrequest[order]=='weight'}-->↓<!--{/if}--></a></th>
				<th width="40%">标题</th>
				<th width="10%"><a href="{ADMIN_WEBURLPATH}/index.php?mode=news&order=showtime{$webglobal[file_news][pageurl]}" class="special" title="点击按此排序">显示时间<!--{if $webrequest[order]=='showtime'}-->↓<!--{/if}--></a></th>
				<th width="10%"><a href="{ADMIN_WEBURLPATH}/index.php?mode=news&order=edittime{$webglobal[file_news][pageurl]}" class="special" title="点击按此排序">编辑时间<!--{if $webrequest[order]=='edittime'}-->↓<!--{/if}--></a></th>
				<th width="10%">管理</th>
			</tr>
		</thead>
		<tbody>
			<!--{if $webglobal[file_news][datanum]>0}-->
				<!--{loop $webglobal[file_news][dataarray] $tempkey $temptable}-->
					<tr>
						<td{$temptable[tdclass]}><input type="checkbox" name="delid[]" value="{$tempkey}" /></td>
						<td{$temptable[tdclass]}>$temptable[id]</td>
						<td{$temptable[tdclass]}>{$webglobal[file_news][category][$temptable[news_category_id]][name]}</td>
						<td{$temptable[tdclass]}><input type="checkbox" name="index[{$tempkey}]" value="1"{if $temptable[index]==1} checked="checked"{/if} /></td>
						<td{$temptable[tdclass]}><input type="checkbox" name="ishot[{$tempkey}]" value="1"{if $temptable[ishot]==1} checked="checked"{/if} /></td>
						<td{$temptable[tdclass]}><input type="text" name="weight[{$tempkey}]" size="5" value="{$temptable[weight]}" /></td>
						<td{$temptable[tdclass]}><!-- <a href="{WEBURLPATH}/news.php?id={$tempkey}" class="special" target="_blank" title="点击查看显示效果"> -->$temptable[title]<!-- </a> --></td>
						<td{$temptable[tdclass]}>$temptable[showtime_show]</td>
						<td{$temptable[tdclass]}>$temptable[edittime_show]</td>
						<td{$temptable[tdclass]}>
							<a href="{ADMIN_WEBURLPATH}/index.php?mode=newsedit&editid={$tempkey}&gourl={$webglobal[file_news][gourlencode]}" class="special">[编辑]</a>
						</td>
					</tr>
				<!--{/loop}-->
			<!--{else}-->
				<tr><td colspan="10" style="text-align: center">还没有资讯。</td></tr>
			<!--{/if}-->
		</tbody>
	</table>

	<!--{if $webglobal[file_news][datanum]>0}-->
		<table style="width:100%;border-style:none;" cellpadding="0" cellspacing="0">
			<tr>
				<td style="width:80px;margin:0;padding:0;"></td>
				<td style="text-align:right;margin:0;padding:5px 0;">{template page}</td>
			</tr>
		</table>
	<!--{/if}-->
	</form>

<!--{/if}-->

{template footer}